package DiErZhou.Day1;

public class Day1_12 {
    public static void main(String[] args) {
        int []age={4,3,2,8,6};
      // int sum=0;double ave;
      //  for (int i = 0; i < age.length; i++) {
       //   sum+=age[i];
       // }
       // ave=sum*1.0/age.length;
       // System.out.println("ave = " + ave);
       // int max=age[0];
       // for (int i = 0; i < age.length; i++) {
         //   if (max<age[i])
          //      max=age[i];
       // }
       // System.out.println("max = " + max);
        int min=age[0];
        for (int i = 1; i < age.length; i++) {
            if(min>age[i])
            min=age[i];
        }
        System.out.println("min = " + min);


        // for (int i = 0; i < age.length; i++) {
       //     System.out.println("age["+i+"] = " + age[i]);
      //  }
    }
}
